Defining a scenario parameter for a macro allows the user to easily change parameters before the simulation starts. It provides an experimental framework for defining multiple scenarios to be run in a batch. See Scenarios for more information. A scenario parameter for a macro allows a macro’s text to be changed by the user whenever a simulation run begins. Since macros are allowed in any expression, this gives the user flexibility to edit most scenario parameters every time a simulation starts without having to directly edit the model data.
The key difference between a macro defined as a scenario parameter and one that is not, is that the macro will be listed as a parameter in the scenario manager. A scenario parameter allows you to request a variety of information to substitute for a macro; from simple values (e.g., the initial value of a location’s capacity) to complex text (e.g., a line of logic). You may create scenario parameters using the macros table, under the Type column.
Parameter Name This text will identify the parameter represented by this macro. It should consist of text that clearly describes the parameter to be changed, for example, Operation Time. The macro name and the parameter name can be different. This provides more flexibility and allows you to view a more descriptive parameter name when defining scenarios.
Prompt This text will appear as a tool tip in the scenario manager. You should use it to further specify the information to be entered, for example, “Please enter the amount of time the simulation should run.”
Unrestricted Text This option allows the user to enter any text, such as the distribution U(8,2). Note that any text that the user enters will be substituted for the macro name in the model. Therefore, the text the user enters must be syntactically correct and valid anywhere the macro name appears.
Record Range Allows you to enable an arrival or shift record from a range of records. This allows you to test a variety of shift and arrival combinations to find the combination that works best with your model.
Numeric Range This specifies the lower and upper limits for the parameter if the type is numeric.
How to define a macro as a Scenario Parameter:
Please Note: When using a record range, be sure to group all arrival and shift records. This will allow you to select which series of records to include in the macro. Note also that when you define an arrival or shift scenario parameter,
Suppose you build a clinic model that seems to indicate that the time it takes to care for minor illness patients is producing a bottleneck. In essence, model results indicate fewer patients are able to receive treatment than expected and you decide to perform several what-if scenarios with the model by changing the treatment time for minor illness patients. Instead of changing the treatment time within the Process edit table, it is easier to define a macro as a scenario parameter. This technique allows you to see the effect of increasing and decreasing treatment times easily, without editing the model itself. The following example represents the dialog used to define a scenario parameter for the macro where the treatment time is a numeric value between 10 and 20 minutes:
After defining the scenario parameter for the macro, substitute the macro, Treatment_time, in the operation logic of the Process edit table for Treatment_room as shown below:
You are now able to change the
Please Note: For more information concerning the differences between macros and subroutines, see Macros and Subroutines.
© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com |